package com.zsc.newbuds.mapper;

import com.zsc.newbuds.entity.Application;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author D
 */
public interface ApplicationMapper {

    /**
     * 获取所有志愿者申请列表
     * @return
     */
    @Select("select * from application")
    List<Application> getApplicationList();

    /**
     * 更新志愿者申请状态
     * @param id
     * @param state
     */
    @Update("update application set application_state = #{state} where application_id = #{id}")
    void updateState(Integer id,String state);
}
